import QtQuick 2.1
import QtQuick.Controls 1.0
import QtQuick.Window 2.0

Rectangle {
    property int getting_width: 800
    property int getting_height: 480
    property string choice: "NTR"
    width: getting_width
    height: getting_height
    Rectangle
    {
        id:bacground
        width: getting_width
        height:getting_height
        anchors.centerIn: parent
        color:"white"        
    }

    Item{
        id: item1
        width: getting_width/4*3
        height: getting_height/3*1
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.verticalCenter: parent.verticalCenter
        Item
        {
            id: fractAlli
            width: getting_width/4
            height: getting_height/3*1
            anchors.left: parent.left
            anchors.leftMargin: 0
            Image {
                id: pic1
                source: "http://media.blizzard.com/wow/icons/56/inv_jewelry_trinketpvp_01.jpg"
                anchors.horizontalCenter: parent.horizontalCenter
                anchors.verticalCenter: parent.verticalCenter               
            }
            MouseArea
            {
                anchors.fill: parent
                onClicked:
                {
                    choice = "ALLI"
                }
            }
        }
        Item
        {
            id: fractNtr
            width: getting_width/4
            height: getting_height/3*1
           anchors.centerIn: parent
            Image {
                id: pic2
                source: "http://media.blizzard.com/wow/icons/56/inv_shield_10.jpg"
                anchors.horizontalCenter: parent.horizontalCenter
                anchors.verticalCenter: parent.verticalCenter
            }
            MouseArea
            {
                anchors.fill: parent
                onClicked:
                {
                    choice = "NTR"
                }
            }
        }
        Item
        {
            id: fractHorde
            width: getting_width/4
            height: getting_height/3*1
            anchors.right: parent.right
            anchors.rightMargin: 0
            Image {
                id: pic3
                source: "http://media.blizzard.com/wow/icons/56/inv_jewelry_trinketpvp_02.jpg"
                anchors.horizontalCenter: parent.horizontalCenter
                anchors.verticalCenter: parent.verticalCenter
            }
            MouseArea
            {
                anchors.fill: parent
                onClicked:
                {
                    choice = "HORDE"
                }
            }
        }
    }
    Text {
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.bottom: parent.bottom
        anchors.bottomMargin: 100
        id: name
        verticalAlignment: Text.AlignVCenter
        horizontalAlignment: Text.AlignHCenter
        text: qsTr("Your choice is \n") + choice + "\n" + ListMaintance.realmsList("ru")[0]
        font.pointSize: 22
    }
}
